// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/requestPro';


/**
 * 开票管理 列表
 * @param pram
 */
export function getInvoceListApi(params) {
	return request({
		url: `/admin/invoice/check/getInvoceList`,	
		method: 'get',
		params,
	});
}

// 开票成功 列表
export function getInvOverPageApi(params) {
	return request({
		url: `/admin/invoice/check/getInvOverPage`,	
		method: 'get',
		params,
	});
}

// 待开票 -> 开票中 (申请开票)
export function updateInvoceInvoicingApi(data) {
	return request({
		url: `/admin/invoice/check/updateInvoceInvoicing`,	
		method: 'post',
		data,
	});
}

// 开票中 -> 待开票 (重发)
export function updateInvoceRevokeApi(data) {
	return request({
		url: `/admin/invoice/check/updateInvoiceRevoke`,	
		method: 'post',
		data,
	});
}

//开票成功详情
export function getInvOverApi(params) {
	return request({
		url: `/admin/invoice/check/getInvOver`,	
		method: 'get',
		params,
	});
}

//开票详情
export function getInvoceApi(params) {
	return request({
		url: `/admin/invoice/check/getInvoce`,	
		method: 'get',
		params,
	});
}

//获取 发票列表详情
export function getOrderByInvIdApi(params) {
  return request({
    url: '/admin/invoice/check/getOrderByInvId',
    method: 'get',
    params,
  });
}

//开票成功 -> 开票中
export function updateInvoceCancelApi(params) {
  return request({
    url: '/admin/invoice/check/updateInvoceCancel',
    method: 'get',
    params,
  });
}

//开票中 -> 开票成功
export function updateInvoceSuccessApi(data) {
  return request({
    url: '/admin/invoice/check/updateInvoceSuccess',
    method: 'post',
    data,
  });
}

// 查询所选发票下商品
export function getInvMerchandiseApi(data) {
  return request({
    url: '/admin/invoice/check/getInvMerchandise',
    method: 'post',
    data,
  });
}